
import os

try:
    os.remove('out.txt')
except:
    pass

envs = os.listdir('envs')
for env in envs:
    devices = os.listdir('envs/' + env + '/fib')
    print(devices)
    for device in devices:
        fib = 'envs/' + env + '/fib/' + device
        dvnet = 'envs/' + env + '/dvnet'
        trace = 'envs/' + env + '/trace/' + device
        os.system('java -jar replay.jar %s %s %s %s' % (device, fib, dvnet, trace))